import request from "../../http";
const userApi = {
  async getUserData(query) {
    return request({
      url: "/api/user/list",
      method: "get",
      params: query
    });
  },
  async queryUserData(query) {
    return request({
      url: "/api/user/list",
      method: "get",
      params: query
    });
  },
  async delUserDatas(ids) {
    return request({
      url: "/api/user",
      method: "delete",
      data: ids
    });
  },
  async postUserData(params) {
    return request({
      url: "/api/user",
      method: "post",
      data: params
    });
  },
  async getUserDetail(id) {
    return request({
      url: `/api/user/${id}`,
      method: "get"
    });
  },
  async changeUserStatus(params) {
    return request({
      url: "/api/user/changeStatus",
      method: "put",
      data: params
    });
  },
  async approval(params) {
    return request({
      url: "/api/user",
      method: "put",
      data: params
    });
  }
};

export default userApi;
